# a = [1,2,3,4,5,6,7,8,9]
# b = []

# list(可迭代对象)
# a = list() # 创建一个空的列表对象
# print(a)
# print(list(range(10)))#只添加一个数字，默认为起始位置为0，此数字为终止位置
# print(list(range(0,10)))
# print(list(range(1, 11)))
# print(list(range(0, 30, 5)))# 步长为5
# print(list(range(0, -10, -1)))# 负数
#
# # 起始位置小于等于终止位置显示为空
# print(list(range(0)))
# print(list(range(1,0)))

# a = list() # 创建一个空的列表对象
# a = list(range(10))
# print(a[5])
# print(a)

# a = ["a","b","c","d","e"]
#
# print(a.index("a"))
# print(a.index("a",1,2))

# a = list() # 创建一个空的列表对象
# a.append(1)
# a.append(2)
# print(a)

# b = ["a","b","c"]
# b.insert(1,"123456")
# print(b)

#
# a=[10,20,30]
# print(a.pop(1))

# a = [10,20,30,66]
# a.clear()
# print(a)


# a = [10,20,30,66,10]
# print(sum(a))
# # 运行结果 ： 66


# a = [10,20,30,66,10]
#
# print(sorted(a))

# a = [20,10,30,40]
# c = reversed(a)
# print(c)
# print(list(c))
# print(c)
# print(list(c))
#
# # 运行结果：[10, 66, 30, 20]

# x = [100,200,300]
# #x 和 y 指向同一个内存空间  会相互影响
# y = x # 等号是内存地址的赋值
# b = x.copy()
# print(b)
# x[0] = 1
# print(y)


# b = tuple()  # 创建一个空元组对象
# print(b)
# b = tuple("abc")  # 创建一个元组，并存储一个字符串
# print(b)
# b = tuple(range(3))  # 创建一个元组，并存储3个数字（1，2，3）
# print(b)
# b = tuple([2, 3, 4])  # 创建一个元组，并存储一个列表
# print(b)


# a=(20,10,30,9,8)
# print(a[1])
# print(type(a[1]))
# print(a[1:3])
# print(type(a[1:3]))
# print(a[1:3])
# print(a[:4])
# print(a[::-1])


# a=(20,10,30,9,8,10)
# print(a.count(10))

# a=(20,10,30,9,8)
# print(sorted(a))
#
# a = (1, 20)
# b = (30, 20)
# print(a+b)

# a=(20,10,30,9,8)
#
# # 因为获取出的结果为 int 类型，需要使用类型转换打印输出，使结果更加直观
# print("获取元组长度:" + str(len(a)))
# print("获取元组最大元素" + str(max(a)))
# print("获取元组最小元素:" + str(min(a)))
# print("计算元组中全部元素的总和:" + str(sum(a)))

# a = [1,2,3]
# b = ['a','b','c']
# c = [1.03,2.65,5.89]
#
# d = zip(a,b,c) # 将列表存储进 zip 对象当中
# e = zip(a,b,c)
#
# print(type(d)) # 打印当前对象类型
# print(tuple(d)) # 将对象存储进元组中，并将对象中的元素迭代入元组当中
# print(list(e)) # 将对象存储进元组中，并将对象中的元素迭代入列表当中
#
#
# a = "qwertyuiop"
# print(a.find("e",0,9))


# a={'name':'龙仔','age':18,'job':'programmer'}
# print(a)
# b=dict(name='龙仔',age=18,job='programmer')
# print(b)
# c=dict([("name","龙仔"),("age",18),("job","programmer")])
# print(c)
# d={} #空的字典对象
# print(d)
# e=dict() #空的字典对象
# print(e)


# a=dict.fromkeys(['name','age','job'])
# print(a)


# b=dict(name='龙仔',age=18,job='programmer')
# print(b["name"])

# b=dict(name='龙仔',age=18,job='programmer')
# print(len(b))
#
# print("name" in b)


# b=dict(name='龙仔',age=18,job='programmer')
# b["sex"] = "男"
# print(b)

# a = {'name': '水泽', 'age': 999, 'job': 'programmer'}
# b = dict(name='姚青', money=1000, sex='男')
# a.update(b)
# print(a)

# a = {'name': '水泽','age': 999,'job': 'programmer'}
# a.clear()
# print(a)

# a = {1,2,3,4,"wyqeui",'we'}
# print(a)
# b = [1,2,"wyqeui",'we',3,4]
# x = set(b)
# print(x)
# y = set()
# print(y)

# x = set()
# x.add(111)
# x.add(222)
# x.add(333)
# print(x)
#
# x.clear()
# print(x)

# a = {10,20,30,40,50}
# b = {30,40,50,60,70}
# c = {50,60,70,80,90}
# b = a.union(b,c)
# print(b)

a = {10,20,30,40,50}
a.update([23,90,41])
print(a)


































